home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.teleport.com!usenet
- From: GHouck <hksys@teleport.com>
- Newsgroups: comp.lang.c
- Subject: Re: Checking For Keyboard Input
- Date: 25 Feb 1996 23:32:42 GMT
- Organization: systems hk
- Message-ID: <4gqriq$qf2@maureen.teleport.com>
- References: <cerebus.34.000DD98A@voicenet.com>
- NNTP-Posting-Host: ip-pdx02-43.teleport.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.22 (Windows; I; 32bit)
-
- cerebus@voicenet.com (aLEX) wrote:
- >Hello fellow C programmers,
- > Is there anyway to check if keyboard input has been entered without
- >actually stalling the excution of the code until the user presses a key. I
- >would really like to do this but I can't seem to find any way. If you know of
- >a way PLEASE email me or post it. Thank you in advance.
- > aLEX
- > cerebus@voicenet.com
- aLEX,
- There is if you're using Borland on DOS/Windows: there is a function called
- kbhit()
- If a key has been hit, it returns a non-zero value, else it returns zero. If
- one is available you can then get it with another call.
- Yours, Geoff Houck
-
-